import { useState, useEffect } from "react";
import { tripmanage_list, health_list } from '../utils/api2'
//自定义表单数据
export function useTripmanage() {
    var [list, setList] = useState([])
    useEffect(() => {
        tripmanage_list().then((res) => {
            setList(res.data)
        })
    }, [])
    return [list, setList]
}

export function useHealth() {
    var [healthlist, setHealth] = useState([])
    useEffect(() => {
        health_list().then((res) => {
            setHealth(res.data)
        })
    }, [])
    return [healthlist, setHealth]
}